<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
<HEAD>

<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2012. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"></script>
<TITLE>Workbench Core Expressions</TITLE>

<link rel="stylesheet" type="text/css" HREF="../book.css">
</HEAD>
<BODY BGCOLOR="#ffffff">
<h1>Workbench Core Expressions</h1>

<p>
The workbench uses core expressions (See 
<a href="../reference/extension-points/org_eclipse_core_expressions_definitions.html">org.eclipse.core.expressions.definitions</a>
for a description) for <code>enabledWhen</code> and <code>activeWhen</code> for handlers, programmatic 
activation of contexts, and for <code>visibleWhen</code> for menu contributions. Core expressions are also used
as conditionals for certain property page contribution and object contribution expressions, using the 
<code>enablement</code> element.
In most cases, the workbench provides the 
<a href="../reference/api/org/eclipse/core/expressions/IEvaluationContext.html">IEvaluationContext</a>
that command core expressions are evaluate against.
</p>

<p>
The <a href="../reference/api/org/eclipse/ui/services/IEvaluationService.html">IEvaluationService</a>
provides methods that allow other clients and extension point builders to hook into the workbench
core expressions.
</p>

<h2>Using Core Expressions in the Workbench</h2>

<p>
Core expressions are used declaratively in the plugin.xml files, and programmatically with some of the
services provided in the workbench.
</p>

<p>
Note: Elements from workbench extension points that use core expressions, like <code>enabledWhen</code>,
take one child core expression element.  
They do not <b>and</b> their elements together.
</p>

<h3>Declarative Expression Examples</h3>

<ol>
<li><a href="#ex1">Basic IStructuredSelection</a></li>
<li><a href="#ex2">IResources and the Package or Project Explorer</a></li>
<li><a href="#ex3">Active Contexts</a></li>
<li><a href="#ex4">Active Views and Editor</a></li>
<li><a href="#ex5">ActionSets and Contexts</a></li>
</ol>

<a name="ex1"></a><h4>Basic IStructuredSelection</h4>

<p>
Most of the tree or table like viewers return an
<a href="../reference/api/org/eclipse/jface/viewers/IStructuredSelection.html">IStructuredSelection</a>.
For example, the Project Explorer and Package Explorer. 
</p>

<p>
When using the default variable you must treat it as an <code>java.util.Collection</code>.  
That means using &lt;count&gt; or &lt;iterate&gt;.  The expression below returns true if all of
the selected items are <code>Person</code>.
</p>

<pre>
&lt;enabledWhen&gt;
    &lt;iterate ifEmpty="false"&gt;
        &lt;instanceof value="org.eclipse.ui.examples.contributions.model.Person"/&gt;
    &lt;/iterate&gt;
&lt;/enabledWhen&gt;
</pre>

<p>
This is equivalent to:
</p>

<pre>
&lt;enabledWhen&gt;
    &lt;with variable="selection"&gt;
        &lt;iterate ifEmpty="false"&gt;
            &lt;instanceof value="org.eclipse.ui.examples.contributions.model.Person"/&gt;
        &lt;/iterate&gt;
    &lt;/with&gt;
&lt;/enabledWhen&gt;
</pre>

<p>
The behaviour of <code>iterate</code> is:
</p>

<ul>
<li><code>iterate</code> <b>and</b>s the results of evaluating its child expressions for each
element in the collection, unless you set the <code>operator</code> attribute.</li>
<li><code>iterate</code> has the same semantics for its children as &lt;and&gt;</li>
<li><code>iterate</code> with an operator of <b>and</b> returns true if the collection is empty,
unless you set the <code>ifEmpty</code> attribute.</li>
</ul>


<p>
If you want to be enabled if only one Person is selected, you can include a <code>count</code>
element.
</p>

<pre>
&lt;enabledWhen&gt;
    &lt;with variable="selection"&gt;
        &lt;count value="1"/&gt;
        &lt;iterate ifEmpty="false"&gt;
            &lt;instanceof value="org.eclipse.ui.examples.contributions.model.Person"/&gt;
        &lt;/iterate&gt;
    &lt;/with&gt;
&lt;/enabledWhen&gt;
</pre>

<p>
The same expression using the default variable:
</p>

<pre>
&lt;enabledWhen&gt;
    &lt;and&gt;
        &lt;count value="1"/&gt;
        &lt;iterate ifEmpty="false"&gt;
            &lt;instanceof value="org.eclipse.ui.examples.contributions.model.Person"/&gt;
        &lt;/iterate&gt;
    &lt;/and&gt;
&lt;/enabledWhen&gt;
</pre>



<a name="ex2"></a><h4>IResources and the Package or Project Explorer</h4>

<p>
The Package Explorer is a mixture of
<a href="../reference/api/org/eclipse/core/resources/IResource.html">org.eclipse.core.resources.IResource</a>,
<code>org.eclipse.jdt.core.IJavaElement</code> and other classes. If you are trying to find all of 
the "*.java" files, you would need to:
</p>
<ol>
<li>Iterate through the default variable.</li>
<li>Adapt the selection elements to your class, in this case 
<a href="../reference/api/org/eclipse/core/resources/IResource.html">org.eclipse.core.resources.IResource</a>.</li>
<li>Use one of the org.eclipse.core.resources property testers to test the 
<a href="../reference/api/org/eclipse/core/resources/IResource.html">org.eclipse.core.resources.IResource</a> property.</li>
</ol> 

<pre>
&lt;enabledWhen&gt;
    &lt;with variable="selection"&gt;
        &lt;iterate ifEmpty="false"&gt;
            &lt;adapt type="org.eclipse.core.resources.IResource"&gt;
                &lt;test property="org.eclipse.core.resources.name"
                         value="*.java"/&gt;
            &lt;/adapt&gt;
        &lt;/iterate&gt;
    &lt;/with&gt;
&lt;/enabledWhen&gt;
</pre>

<p>
When working with the current selection and property testers it does not always make sense to use 
<code>adapt</code>.  In these situations it is a good practice to check that the object under test
is a valid type for that property tester:
</p>

<pre>
&lt;enabledWhen&gt;
    &lt;with variable="selection"&gt;
        &lt;iterate ifEmpty="false"&gt;
            &lt;instanceof type="org.eclipse.core.resources.IResource"/&gt;
            &lt;test property="org.eclipse.core.resources.name"
                     value="*.java"/&gt;
        &lt;/iterate&gt;
    &lt;/with&gt;
&lt;/enabledWhen&gt;
</pre>


<a name="ex3"></a><h4>Active Contexts</h4>

<p>
If your handler should be enabled when your view or editor activates a context, you can use the
<code>activeContexts</code> variable.  Contexts are defined in the 
<a href="../reference/extension-points/org_eclipse_ui_contexts.html">org.eclipse.ui.contexts</a>
extension point and activated programmatically using the 
<a href="../reference/api/org/eclipse/ui/contexts/IContextService.html">org.eclipse.ui.contexts.IContextService</a>.
</p>

<pre>
&lt;enabledWhen&gt;
    &lt;with variable="activeContexts"&gt;
        &lt;iterate ifEmpty="false" operator="or"&gt;
            &lt;equals value="org.example.view.context"/&gt;
        &lt;/iterate&gt;
    &lt;/with&gt;
&lt;/enabledWhen&gt;
</pre>

<a name="ex4"></a><h4>Active Views and Editor</h4>

<p>
For handlers that are to be contributed to a specific view or editor, you can use <code>activeEditorId</code>
and <code>activePartId</code> in the <code>activeWhen</code> clause.  This is an example for a handler
that should be active in text editors:
</p>

<pre>
&lt;activeWhen&gt;
    &lt;with variable="activeEditorId"&gt;
        &lt;equals value="org.eclipse.ui.DefaultTextEditor"/&gt;
    &lt;/with&gt;
&lt;/activeWhen&gt;
</pre>

<p>
The following clause is for a handler that's active while in the Project Explorer:
</p>

<pre>
&lt;activeWhen&gt;
    &lt;with variable="activePartId"&gt;
        &lt;equals value="org.eclipse.ui.navigator.ProjectExplorer"/&gt;
    &lt;/with&gt;
&lt;/activeWhen&gt;
</pre>

<a name="ex5"></a><h4>ActionSets and Contexts</h4>

<p>As of 3.3 all <a href="../reference/extension-points/org_eclipse_ui_actionSets.html">org.eclipse.ui.actionSets</a> <b>(Deprecated)</b>
generate a context with a parent of <code>org.eclipse.ui.contexts.actionSet</code>.  Contexts with
this parent are filtered from the <a class="command-link" 
href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.Keys)")'> 
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link, Keys Preference Page"> <b>General &gt; Keys</b></a> preference page.
</p>

<p>
Showing an
actionSet activates the matching context.  This allows contributed commands to "join" actionSets, like
the debug launch actionSet. 
</p>

<pre>
&lt;enabledWhen&gt;
    &lt;with variable="activeContexts"&gt;
        &lt;iterate ifEmpty="false" operator="or"&gt;
            &lt;equals value="org.eclipse.debug.ui.launchActionSet"/&gt;
        &lt;/iterate&gt;
    &lt;/with&gt;
&lt;/enabledWhen&gt;
</pre>

<p>
Note: commands that are enabled or visible with actionSets are not currently displayed in the
<b>Customize Perspective Dialog</b>.
</p>

<h3>Variables Provided in the Workbench</h3>

<p>
The <a href="../reference/api/org/eclipse/ui/services/IEvaluationService.html">IEvaluationService</a>
provides the global selection as the default variable (in a <code>java.util.Collection</code>) for
expression evaluation.
It can either be empty, have one entry (if the 
<a href="../reference/api/org/eclipse/jface/viewers/ISelection.html">ISelection</a> was something like an
<a href="../reference/api/org/eclipse/jface/text/ITextSelection.html">ITextSelection</a>), 
or have the contents of an 
<a href="../reference/api/org/eclipse/jface/viewers/IStructuredSelection.html">IStructuredSelection</a>. 
</p>

<p>
The workbench publishes variables in <a href="../reference/api/org/eclipse/ui/ISources.html">ISources</a>
that can be used in the &lt;with/&gt; element and can be retrieved from the
<a href="../reference/api/org/eclipse/core/expressions/IEvaluationContext.html">IEvaluationContext</a>.
Some of the variables may not be set, depending on the current application context when they are evaluated.
The following table explains some of the more commonly used ones: 
</p>

<table border="1">
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>

<th>Since</th>
</tr>

<tr>
<td>activeContexts</td>
<td>A <code>java.util.Collection</code> of <code>java.lang.String</code></td>
<td>
<p>This is a collection of the active context IDs as strings.  Most commonly used with &lt;iterate/&gt;, 
&lt;count/&gt;, and &lt;test/&gt; with a combined <code>org.eclipse.core.expressions.PropertyTester</code>.  
In <b>3.3</b> action sets are mirrored by contexts whose parent is <code>org.eclipse.ui.actionSet</code>, 
and the active action sets show up in the list of active contexts.

</p>
</td>
<td>3.2</td>
</tr>

<tr>
<td>activeShell</td>
<td><code><a href="../reference/api/org/eclipse/swt/widgets/Shell.html">org.eclipse.swt.widgets.Shell</a></code></td>
<td>
<p>The currently active shell.  It can be a dialog or workbench window shell.
</p>
</td>
<td>3.2</td>
</tr>

<tr>
<td>activeWorkbenchWindowShell</td>
<td><code><a href="../reference/api/org/eclipse/swt/widgets/Shell.html">org.eclipse.swt.widgets.Shell</a></code></td>
<td>
<p>The active workbench window shell.
</p>
</td>
<td>3.2</td>
</tr>

<tr>
<td>activeWorkbenchWindow</td>

<td><code><a href="../reference/api/org/eclipse/ui/IWorkbenchWindow.html">org.eclipse.ui.IWorkbenchWindow</a></code></td>
<td>
<p>The active workbench window.
</p>
</td>
<td>3.2</td>
</tr>

<tr>
<td>activeWorkbenchWindow.isCoolbarVisible</td>
<td><code>java.lang.Boolean</code></td>
<td>
<p>Reports coolbar visibility for the currently active workbench window.

</p>
</td>
<td>3.3</td>
</tr>

<tr>
<td>activeWorkbenchWindow.isPerspectiveBarVisible</td>
<td><code>java.lang.Boolean</code></td>
<td>
<p>Reports perspective bar visibility for the currently active workbench window.
</p>
</td>
<td>3.3</td>

</tr>

<tr>
<td>activeWorkbenchWindow.activePerspective</td>
<td><code>java.lang.String</code></td>
<td>
<p>Reports the name of the current perspective of the active workbench window.
</p>
</td>
<td>3.4</td>
</tr>

<tr>
<td>activeEditor</td>

<td><code><a href="../reference/api/org/eclipse/ui/IEditorPart.html">org.eclipse.ui.IEditorPart</a></code></td>
<td>
<p>The currently active editor.  This is remembered even if the editor is not the currently active part.
</p>
</td>
<td>3.2</td>
</tr>

<tr>
<td>activeEditorId</td>
<td><code>java.lang.String</code></td>
<td>
<p>The ID of the currently active editor.  This can be used for expressions on the editor type.

</p>
</td>
<td>3.2</td>
</tr>

<tr>
<td>activeEditorInput</td>
<td><code><a href="../reference/api/org/eclipse/ui/IEditorInput.html">org.eclipse.ui.IEditorInput</a></code></td>
<td>
<p>The input of the currently active editor.  This is useful for property testers.

</p>
</td>
<td>3.5</td>
</tr>



<tr>
<td>activePart</td>
<td><code><a href="../reference/api/org/eclipse/ui/IWorkbenchPart.html">org.eclipse.ui.IWorkbenchPart</a></code></td>
<td>
<p>The active part, which can be the same as the active editor.
</p>
</td>
<td>3.2</td>

</tr>

<tr>
<td>activePartId</td>
<td><code>java.lang.String</code></td>
<td>
<p>The ID of the currently active part.
</p>
</td>
<td>3.2</td>
</tr>

<tr>
<td>activeSite</td>

<td><code><a href="../reference/api/org/eclipse/ui/IWorkbenchPartSite.html">org.eclipse.ui.IWorkbenchPartSite</a></code></td>
<td>
<p>The site of the currently active part.
</p>
</td>
<td>3.2</td>
</tr>

<tr>
<td>selection</td>
<td><code><a href="../reference/api/org/eclipse/jface/viewers/ISelection.html">org.eclipse.jface.viewers.ISelection</a></code></td>
<td>
<p>The current global selection.  It is often used with &lt;test/&gt; elements with 
<code>org.eclipse.core.expressions.PropertyTester</code>, in programmatic core expressions, 
and in <b>3.3</b> with &lt;iterate/&gt; and &lt;count/&gt; elements.

</p>
</td>
<td>3.2</td>
</tr>

<tr>
<td>activeMenu</td>
<td>A <code>java.util.Collection</code> of <code>java.lang.String</code></td>
<td>
<p>This is the list of IDs of the showing context menu.  Examples are like #TextEditorRuler or 
a part ID. Most commonly used with &lt;iterate/&gt;, &lt;count/&gt;, and &lt;test/&gt; with 
a combined <code>org.eclipse.core.expressions.PropertyTester</code>.

</p>
</td>
<td>3.2</td>
</tr>

<tr>
<td>activeMenuSelection</td>
<td><code><a href="../reference/api/org/eclipse/jface/viewers/ISelection.html">org.eclipse.jface.viewers.ISelection</a></code></td>
<td>
<p>This is a selection that is available while a context menu is showing.  It is the selection 
from the selection provider used to register the context menu, usually from 
<a href="../reference/api/org/eclipse/ui/IWorkbenchPartSite.html#registerContextMenu(org.eclipse.jface.action.MenuManager,%20org.eclipse.jface.viewers.ISelectionProvider)">getSite().registerContextMenu(*)</a>.
It is usually the same as  the <code>selection</code>variable, but not always.
</p>
</td>
<td>3.3</td>
</tr>

<tr>
<td>activeMenuEditorInput</td>
<td><code><a href="../reference/api/org/eclipse/jface/viewers/ISelection.html">org.eclipse.jface.viewers.ISelection</a></code></td>
<td>
<p>This is a selection that is available while a context menu is showing.  It is the selection from 
the editor input, usually if includeEditorInput was set to <code>true</code> during 
<code>getEditorSite().registerContextMenu(*)</code>.

</p>
</td>
<td>3.3</td>
</tr>

<tr>
<td>activeFocusControl</td>
<td><code><a href="../reference/api/org/eclipse/swt/widgets/Control.html">org.eclipse.swt.widgets.Control</a></code></td>
<td>
<p>A control that has focus and has been registered with the 
<a href="../reference/api/org/eclipse/ui/swt/IFocusService.html">IFocusService</a>.
</p>
</td>

<td>3.3</td>
</tr>

<tr>
<td>activeFocusControlId</td>
<td><code>java.lang.String</code></td>
<td>
<p>The ID of a control that has focus and has been registered with the 
<a href="../reference/api/org/eclipse/ui/swt/IFocusService.html">IFocusService</a>.
</p>
</td>
<td>3.3</td>

</tr>

<tr>
<td>org.eclipse.core.runtime.Platform</td>
<td><code><a href="../reference/api/org/eclipse/core/runtime/Platform.html">org.eclipse.core.runtime.Platform</a></code></td>
<td>
<p>
The runtime Platform class is available, for use with property testers like <code>org.eclipse.core.runtime.isBundleInstalled</code>
and <code>org.eclipse.core.runtime.product</code>.
</p>
</td>
<td>3.3</td>

</tr>

</table>


<h3>Property Testers Provided in the Workbench</h3>


<p>
The workbench provides a couple of property testers that can be used in core expressions.  
The expression defines a property attribute and then takes a combination of 'args' and a 'value' that 
is tester implementation dependent.  The property attribute is the combination of the namespace 
and property name.  For example, to test an IResource name the property would be 
<code>org.eclipse.core.resources.name</code>.
</p>

<table border="1">
<tr>
<th>Namespace</th>
<th>Type</th>
<th>Implementation</th>
</tr>

<tr>
<td>org.eclipse.core.runtime</td>
<td>
<p><code>org.eclipse.core.runtime.Platform</code>

</p>
</td>
<td>
<code>org.eclipse.core.internal.expressions.propertytester.PlatformPropertyTester</code>
</td>
</tr>


<tr>
<th>Property</th>
<th colspan="2">Description</th>
</tr>

<tr>
<td>
<p>product
</p>
</td>
<td colspan="2">
<p>Test the ID of the currently active product.
</p>
</td>
</tr>

<tr>
<td>
<p>isBundleInstalled
</p>
</td>
<td colspan="2">

<p>Test if a given bundle is installed in the running environment.  Use the 'args' attribute to pass in the bundle ID.
</p>
</td>
</tr>

<tr>
<td>
<p>bundleState
</p>
</td>
<td colspan="2">

<p>Test the state of the bundle in the running environment.  Use the 'args' attribute to pass in the bundle ID and the 'value' attribute to pass the state as defined in <a href="https://docs.osgi.org/javadoc/osgi.core/7.0.0/org/osgi/framework/Bundle.html">Bundle</a>, e.g. "ACTIVE".
</p>
</td>
</tr>

<tr>
<td colspan="3" bgcolor="#000000" height="3" ></td>
</tr>

<tr>
<th>Namespace</th>
<th>Type</th>
<th>Implementation</th>
</tr>

<tr>
<td>org.eclipse.core.resources</td>
<td>
<p><code>org.eclipse.core.resources.IResource</code>
</p>
</td>
<td>
<code>org.eclipse.core.internal.propertytester.ResourcePropertyTester</code>
</td>
</tr>


<tr>
<th>Property</th>
<th colspan="2">Description</th>
</tr>



<tr>
<td>
<p>name
</p>
</td>
<td colspan="2">
<p>A property indicating the file name (value <code>"name"</code>). "*" and "?" wild cards are supported.

</p>
</td>
</tr>

<tr>
<td>
<p>path
</p>
</td>
<td colspan="2">
<p>A property indicating the file path (value <code>"path"</code>). "*" and "?" wild cards are supported.
</p>
</td>
</tr>

<tr>
<td>
<p>extension
</p>
</td>
<td colspan="2">
<p>A property indicating the file extension (value <code>"extension"</code>). "*" and "?" wild cards are supported.
</p>
</td>
</tr>

<tr>
<td>
<p>readOnly
</p>

</td>
<td colspan="2">
<p>A property indicating whether the file is read only (value <code>"readOnly"</code>).
</p>
</td>
</tr>

<tr>
<td>
<p>projectNature
</p>
</td>
<td colspan="2">
<p>A property indicating the project nature (value <code>"projectNature"</code>).

</p>
</td>
</tr>

<tr>
<td>
<p>persistentProperty
</p>
</td>
<td colspan="2">
<p>A property indicating a persistent property on the selected resource (value <code>"persistentProperty"</code>). 
If two arguments are given, this treats the first as the property name, and the second as the expected 
property value. If only one argument (or just the expected value) is given, this treats it as the 
property name, and simply tests for existence of the property on the resource.
</p>
</td>
</tr>

<tr>
<td>
<p>projectPersistentProperty
</p>
</td>
<td colspan="2">
<p>A property indicating a persistent property on the selected resource's project. 
(value <code>"projectPersistentProperty"</code>). If two arguments are given, this treats the first 
as the property name, and the second as the expected property value. If only one argument (or just 
the expected value) is given, this treats it as the property name, and simply tests for existence 
of the property on the resource.
</p>
</td>
</tr>

<tr>
<td>
<p>sessionProperty
</p>

</td>
<td colspan="2">
<p>A property indicating a session property on the selected resource 
(value <code>"sessionProperty"</code>). If two arguments are given, this treats the first as the 
property name, and the second as the expected property value. If only one argument (or just the 
expected value) is given, this treats it as the property name, and simply tests for existence 
of the property on the resource.
</p>
</td>
</tr>

<tr>
<td>
<p>projectSessionProperty
</p>
</td>
<td colspan="2">
<p>A property indicating a session property on the selected resource's project. 
(value <code>"projectSessionProperty"</code>). If two arguments are given, this treats the first 
as the property name, and the second as the expected property value. If only one argument (or just 
the expected value) is given, this treats it as the property name, and simply tests for existence 
of the property on the resource.

</p>
</td>
</tr>

<tr>
<td colspan="3" bgcolor="#000000" height="3" ></td>
</tr>

<tr>
<th>Namespace</th>
<th>Type</th>
<th>Implementation</th>
</tr>

<tr>
<td>org.eclipse.core.resources</td>
<td>
<p><code>org.eclipse.core.resources.IFile</code>
</p>
</td>
<td>
<code>org.eclipse.core.internal.propertytester.FilePropertyTester</code>
</td>
</tr>


<tr>

<th>Property</th>
<th colspan="2">Description</th>
</tr>



<tr>
<td>
<p>contentTypeId
</p>
</td>
<td colspan="2">
<p>A property indicating that we are looking to verify that the file matches the content 
type matching the given identifier. The identifier is provided as the expected value.
</p>
</td>

</tr>

<tr>
<td colspan="3" bgcolor="#000000" height="3" ></td>
</tr>


<tr>
<th>Namespace</th>
<th>Type</th>
<th>Implementation</th>
</tr>

<tr>

<td>org.eclipse.core.resources</td>
<td>
<p><code>org.eclipse.core.resources.IProject</code>
</p>
</td>
<td>
<code>org.eclipse.core.internal.propertytester.ProjectPropertyTester</code>
</td>
</tr>


<tr>
<th>Property</th>

<th colspan="2">Description</th>
</tr>

<tr>
<td>
<p>open
</p>
</td>
<td colspan="2">
<p>A property indicating whether the project is open (value <code>"open"</code>).
</p>
</td>
</tr>

<tr>
<td colspan="3" bgcolor="#000000" height="3" ></td>
</tr>


<tr>
<th>Namespace</th>
<th>Type</th>
<th>Implementation</th>
</tr>

<tr>
<td>org.eclipse.core.resources</td>

<td>
<p><code>org.eclipse.core.resources.mapping.ResourceMapping</code>
</p>
</td>
<td>
<code>org.eclipse.core.internal.propertytester.ResourceMappingPropertyTester</code>
</td>
</tr>


<tr>
<th>Property</th>
<th colspan="2">Description</th>

</tr>

<tr>
<td>
<p>projectPersistentProperty
</p>
</td>
<td colspan="2">
<p>A property indicating a persistent property on the selected resource's project. 
(value <code>"projectPersistentProperty"</code>). If two arguments are given, this treats the 
first as the property name, and the second as the expected property value. If only one argument 
(or just the expected value) is given, this treats it as the property name, and simply tests for 
existence of the property on the resource.
</p>
</td>
</tr>

<tr>
<td colspan="3" bgcolor="#000000" height="3" ></td>

</tr>


<tr>
<th>Namespace</th>
<th>Type</th>
<th>Implementation</th>
</tr>

<tr>
<td>org.eclipse.ui</td>
<td>
<p><code>org.eclipse.ui.IWorkbench (not currently available)</code>

</p>
</td>
<td>
<code>org.eclipse.ui.internal.activities.ActivityPropertyTester</code>
</td>
</tr>


<tr>
<th>Property</th>
<th colspan="2">Description</th>
</tr>

<tr>
<td>
<p>isActivityEnabled
</p>
</td>
<td colspan="2">
<p>Test if the activity in 'args' is enabled.
</p>
</td>
</tr>

<tr>
<td>
<p>isCategoryEnabled
</p>
</td>

<td colspan="2">
<p>Test if the category in 'args' is enabled.
</p>
</td>
</tr>

<tr>
<td colspan="3" bgcolor="#000000" height="3" ></td>
</tr>


<tr>
<th>Namespace</th>
<th>Type</th>
<th>Implementation</th>

</tr>

<tr>
<td>org.eclipse.ui.workbenchWindow</td>
<td>
<p><code>org.eclipse.ui.IWorkbenchWindow</code>
</p>
</td>
<td>
<code>org.eclipse.ui.internal.OpenPerspectivePropertyTester</code>
</td>
</tr>

<tr>
<th>Property</th>
<th colspan="2">Description</th>
</tr>

<tr>
<td>
<p>isPerspectiveOpen
</p>
</td>
<td colspan="2">
<p>Tests if any perspective is open.
</p>
</td>

</tr>

</table>





</BODY>
</HTML>
